home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2009 October / maximum-cd-2009-10.iso / DiscContents / Firefox Setup 3.5.exe / nonlocalized / chrome / browser.jar / content / browser / preferences / tabs.js < prev    next >
Encoding:
JavaScript  |  2009-06-24  |  1.7 KB  |  49 lines

  1. //@line 39 "e:\builds\moz2_slave\win32_build\build\browser\components\preferences\tabs.js"
  2.  
  3. var gTabsPane = {
  4.  
  5.   /*
  6.    * Preferences:
  7.    *
  8.    * browser.link.open_newwindow
  9.    * - determines where pages which would open in a new window are opened:
  10.    *     0 opens such links in the default window,
  11.    *     1 opens such links in the most recent window or tab,
  12.    *     2 opens such links in a new window,
  13.    *     3 opens such links in a new tab
  14.    * browser.tabs.autoHide
  15.    * - true if the tab bar is hidden when only one tab is open, false to always
  16.    *   show it
  17.    * browser.tabs.loadInBackground
  18.    * - true if display should switch to a new tab which has been opened from a
  19.    *   link, false if display shouldn't switch
  20.    * browser.tabs.warnOnClose
  21.    * - true if when closing a window with multiple tabs the user is warned and
  22.    *   allowed to cancel the action, false to just close the window
  23.    * browser.tabs.warnOnOpen
  24.    * - true if the user should be warned if he attempts to open a lot of tabs at
  25.    *   once (e.g. a large folder of bookmarks), false otherwise
  26.    */
  27.  
  28.   /**
  29.    * Determines where a link which opens a new window will open.
  30.    *
  31.    * @returns |true| if such links should be opened in new tabs
  32.    */
  33.   readLinkTarget: function() {
  34.     var openNewWindow = document.getElementById("browser.link.open_newwindow");
  35.     return openNewWindow.value != 2;
  36.   },
  37.  
  38.   /**
  39.    * Determines where a link which opens a new window will open.
  40.    *
  41.    * @returns 2 if such links should be opened in new windows,
  42.    *          3 if such links should be opened in new tabs
  43.    */
  44.   writeLinkTarget: function() {
  45.     var linkTargeting = document.getElementById("linkTargeting");
  46.     return linkTargeting.checked ? 3 : 2;
  47.   }
  48. };
  49.